
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Cppcheck - HTML report - CodeQualityReport</title>
    <link rel="stylesheet" href="style.css">
    <style>
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight { background: #ffffff; }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #FF0000; background-color: #FFAAAA } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .o { color: #333333 } /* Operator */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #557799 } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold } /* Comment.Special */
.highlight .gd { color: #A00000 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.highlight .gr { color: #FF0000 } /* Generic.Error */
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.highlight .gi { color: #00A000 } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
.highlight .gt { color: #0044DD } /* Generic.Traceback */
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #003388; font-weight: bold } /* Keyword.Pseudo */
.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #333399; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #6600EE; font-weight: bold } /* Literal.Number */
.highlight .s { background-color: #fff0f0 } /* Literal.String */
.highlight .na { color: #0000CC } /* Name.Attribute */
.highlight .nb { color: #007020 } /* Name.Builtin */
.highlight .nc { color: #BB0066; font-weight: bold } /* Name.Class */
.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */
.highlight .ni { color: #880000; font-weight: bold } /* Name.Entity */
.highlight .ne { color: #FF0000; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0066BB; font-weight: bold } /* Name.Function */
.highlight .nl { color: #997700; font-weight: bold } /* Name.Label */
.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
.highlight .nt { color: #007700 } /* Name.Tag */
.highlight .nv { color: #996633 } /* Name.Variable */
.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #6600EE; font-weight: bold } /* Literal.Number.Bin */
.highlight .mf { color: #6600EE; font-weight: bold } /* Literal.Number.Float */
.highlight .mh { color: #005588; font-weight: bold } /* Literal.Number.Hex */
.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
.highlight .mo { color: #4400EE; font-weight: bold } /* Literal.Number.Oct */
.highlight .sa { background-color: #fff0f0 } /* Literal.String.Affix */
.highlight .sb { background-color: #fff0f0 } /* Literal.String.Backtick */
.highlight .sc { color: #0044DD } /* Literal.String.Char */
.highlight .dl { background-color: #fff0f0 } /* Literal.String.Delimiter */
.highlight .sd { color: #DD4422 } /* Literal.String.Doc */
.highlight .s2 { background-color: #fff0f0 } /* Literal.String.Double */
.highlight .se { color: #666666; font-weight: bold; background-color: #fff0f0 } /* Literal.String.Escape */
.highlight .sh { background-color: #fff0f0 } /* Literal.String.Heredoc */
.highlight .si { background-color: #eeeeee } /* Literal.String.Interpol */
.highlight .sx { color: #DD2200; background-color: #fff0f0 } /* Literal.String.Other */
.highlight .sr { color: #000000; background-color: #fff0ff } /* Literal.String.Regex */
.highlight .s1 { background-color: #fff0f0 } /* Literal.String.Single */
.highlight .ss { color: #AA6600 } /* Literal.String.Symbol */
.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #0066BB; font-weight: bold } /* Name.Function.Magic */
.highlight .vc { color: #336699 } /* Name.Variable.Class */
.highlight .vg { color: #dd7700; font-weight: bold } /* Name.Variable.Global */
.highlight .vi { color: #3333BB } /* Name.Variable.Instance */
.highlight .vm { color: #996633 } /* Name.Variable.Magic */
.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
    </style>
    <script>
      function getStyle(el, styleProp) {
        var y;

        if (el.currentStyle) {
          y = el.currentStyle[styleProp];
        } else if (window.getComputedStyle) {
          y = document.defaultView.getComputedStyle(el, null).getPropertyValue(styleProp);
        }

        return y;
      }

      function toggle() {
        var el = this.expandable_content;
        var mark = this.expandable_marker;

        if (el.style.display === "block") {
          el.style.display = "none";
          mark.textContent = "[+]";
        } else {
          el.style.display = "block";
          mark.textContent = "[-]";
        }
      }

      function initExpandables() {
        var elements = document.querySelectorAll(".expandable");

        for (var i = 0, len = elements.length; i < len; i++) {
          var el = elements[i];
          var clickable = el.querySelector("span");
          var marker = clickable.querySelector(".marker");
          var content = el.querySelector(".content");
          var width = clickable.clientWidth - parseInt(getStyle(content, "padding-left")) - parseInt(getStyle(content, "padding-right"));
          content.style.width = width + "px";
          clickable.expandable_content = content;
          clickable.expandable_marker = marker;
          clickable.addEventListener("click", toggle);
        }
      }

      function toggleDisplay(cb) {
        var elements = document.querySelectorAll("." + cb.id);

        for (var i = 0, len = elements.length; i < len; i++) {
          elements[i].classList.toggle("id-filtered", !cb.checked);
        }

        updateFileRows();
      }

      function toggleSeverity(cb) {
        cb.parentElement.classList.toggle("unchecked", !cb.checked);
        var elements = document.querySelectorAll(".sev_" + cb.id);

        for (var i = 0, len = elements.length; i < len; i++) {
          elements[i].classList.toggle("severity-filtered", !cb.checked);
        }

        updateFileRows();
      }

      function toggleTool(cb) {
        cb.parentElement.classList.toggle("unchecked", !cb.checked);

        var elements;
        if (cb.id == "clang-tidy")
            elements = document.querySelectorAll("[class^=clang-tidy-]");
        else
            elements = document.querySelectorAll(".issue:not([class^=clang-tidy-])");

        for (var i = 0, len = elements.length; i < len; i++) {
          elements[i].classList.toggle("tool-filtered", !cb.checked);
        }

        updateFileRows();
      }

      function toggleAll() {
        var elements = document.querySelectorAll(".idToggle");

        // starting from 1 since 0 is the "toggle all" input
        for (var i = 1, len = elements.length; i < len; i++) {
          var changed = elements[i].checked != elements[0].checked;
          if (changed) {
            elements[i].checked = elements[0].checked;
            toggleDisplay(elements[i]);
          }
        }
      }

      function filterFile(filter) {
        var elements = document.querySelectorAll(".fileEntry");

        for (var i = 0, len = elements.length; i < len; i++) {
          var visible = elements[i].querySelector("tr").querySelector("td").textContent.toLowerCase().includes(filter.toLowerCase());
          elements[i].classList.toggle("text-filtered", !visible);
        }
      }

      function filterText(text) {
        filter = text.toLowerCase();
        var elements = document.querySelectorAll(".issue");

        for (var i = 0, len = elements.length; i < len; i++) {
          var visible = false;
          var fields = elements[i].querySelectorAll("td");
          for (var n = 0, num = fields.length; n < num; n++) {
            if (fields[n].textContent.toLowerCase().includes(filter)) {
              visible = true;
              break;
            }
          }
          elements[i].classList.toggle("text-filtered", !visible);
        }

        updateFileRows();
      }

      function updateFileRows(element) {
        var elements = document.querySelectorAll(".fileEntry");

        for (var i = 0, len = elements.length; i < len; i++) {
          var visible = elements[i].querySelector(".issue:not(.id-filtered):not(.severity-filtered):not(.tool-filtered):not(.text-filtered)");
          elements[i].classList.toggle("file-filtered", !visible);
        }
      }

      window.addEventListener("load", initExpandables);
    </script>
  </head>
  <body>
    <div id="wrapper">
    <div id="header" class="header">
      <h1>Cppcheck report - CodeQualityReport: Dialog\newdialog.cpp</h1>

    </div>

    <div id="menu">
     <p><a href="index.html">Defects:</a> Dialog\newdialog.cpp</p>
<a href="9.html#line-167"> unknownMacro 167</a>
    </div>
    <div id="content">
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">  1</span>
<span class="normal">  2</span>
<span class="normal">  3</span>
<span class="normal">  4</span>
<span class="normal">  5</span>
<span class="normal">  6</span>
<span class="normal">  7</span>
<span class="normal">  8</span>
<span class="normal">  9</span>
<span class="normal"> 10</span>
<span class="normal"> 11</span>
<span class="normal"> 12</span>
<span class="normal"> 13</span>
<span class="normal"> 14</span>
<span class="normal"> 15</span>
<span class="normal"> 16</span>
<span class="normal"> 17</span>
<span class="normal"> 18</span>
<span class="normal"> 19</span>
<span class="normal"> 20</span>
<span class="normal"> 21</span>
<span class="normal"> 22</span>
<span class="normal"> 23</span>
<span class="normal"> 24</span>
<span class="normal"> 25</span>
<span class="normal"> 26</span>
<span class="normal"> 27</span>
<span class="normal"> 28</span>
<span class="normal"> 29</span>
<span class="normal"> 30</span>
<span class="normal"> 31</span>
<span class="normal"> 32</span>
<span class="normal"> 33</span>
<span class="normal"> 34</span>
<span class="normal"> 35</span>
<span class="normal"> 36</span>
<span class="normal"> 37</span>
<span class="normal"> 38</span>
<span class="normal"> 39</span>
<span class="normal"> 40</span>
<span class="normal"> 41</span>
<span class="normal"> 42</span>
<span class="normal"> 43</span>
<span class="normal"> 44</span>
<span class="normal"> 45</span>
<span class="normal"> 46</span>
<span class="normal"> 47</span>
<span class="normal"> 48</span>
<span class="normal"> 49</span>
<span class="normal"> 50</span>
<span class="normal"> 51</span>
<span class="normal"> 52</span>
<span class="normal"> 53</span>
<span class="normal"> 54</span>
<span class="normal"> 55</span>
<span class="normal"> 56</span>
<span class="normal"> 57</span>
<span class="normal"> 58</span>
<span class="normal"> 59</span>
<span class="normal"> 60</span>
<span class="normal"> 61</span>
<span class="normal"> 62</span>
<span class="normal"> 63</span>
<span class="normal"> 64</span>
<span class="normal"> 65</span>
<span class="normal"> 66</span>
<span class="normal"> 67</span>
<span class="normal"> 68</span>
<span class="normal"> 69</span>
<span class="normal"> 70</span>
<span class="normal"> 71</span>
<span class="normal"> 72</span>
<span class="normal"> 73</span>
<span class="normal"> 74</span>
<span class="normal"> 75</span>
<span class="normal"> 76</span>
<span class="normal"> 77</span>
<span class="normal"> 78</span>
<span class="normal"> 79</span>
<span class="normal"> 80</span>
<span class="normal"> 81</span>
<span class="normal"> 82</span>
<span class="normal"> 83</span>
<span class="normal"> 84</span>
<span class="normal"> 85</span>
<span class="normal"> 86</span>
<span class="normal"> 87</span>
<span class="normal"> 88</span>
<span class="normal"> 89</span>
<span class="normal"> 90</span>
<span class="normal"> 91</span>
<span class="normal"> 92</span>
<span class="normal"> 93</span>
<span class="normal"> 94</span>
<span class="normal"> 95</span>
<span class="normal"> 96</span>
<span class="normal"> 97</span>
<span class="normal"> 98</span>
<span class="normal"> 99</span>
<span class="normal">100</span>
<span class="normal">101</span>
<span class="normal">102</span>
<span class="normal">103</span>
<span class="normal">104</span>
<span class="normal">105</span>
<span class="normal">106</span>
<span class="normal">107</span>
<span class="normal">108</span>
<span class="normal">109</span>
<span class="normal">110</span>
<span class="normal">111</span>
<span class="normal">112</span>
<span class="normal">113</span>
<span class="normal">114</span>
<span class="normal">115</span>
<span class="normal">116</span>
<span class="normal">117</span>
<span class="normal">118</span>
<span class="normal">119</span>
<span class="normal">120</span>
<span class="normal">121</span>
<span class="normal">122</span>
<span class="normal">123</span>
<span class="normal">124</span>
<span class="normal">125</span>
<span class="normal">126</span>
<span class="normal">127</span>
<span class="normal">128</span>
<span class="normal">129</span>
<span class="normal">130</span>
<span class="normal">131</span>
<span class="normal">132</span>
<span class="normal">133</span>
<span class="normal">134</span>
<span class="normal">135</span>
<span class="normal">136</span>
<span class="normal">137</span>
<span class="normal">138</span>
<span class="normal">139</span>
<span class="normal">140</span>
<span class="normal">141</span>
<span class="normal">142</span>
<span class="normal">143</span>
<span class="normal">144</span>
<span class="normal">145</span>
<span class="normal">146</span>
<span class="normal">147</span>
<span class="normal">148</span>
<span class="normal">149</span>
<span class="normal">150</span>
<span class="normal">151</span>
<span class="normal">152</span>
<span class="normal">153</span>
<span class="normal">154</span>
<span class="normal">155</span>
<span class="normal">156</span>
<span class="normal">157</span>
<span class="normal">158</span>
<span class="normal">159</span>
<span class="normal">160</span>
<span class="normal">161</span>
<span class="normal">162</span>
<span class="normal">163</span>
<span class="normal">164</span>
<span class="normal">165</span>
<span class="normal">166</span>
<span class="normal">167</span>
<span class="normal">168</span>
<span class="normal">169</span></pre></div></td><td class="code"><div><pre><span></span><a id="line-1" name="line-1"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">&quot;newdialog.h&quot;</span>
<a id="line-2" name="line-2"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">&lt;DDialogButtonBox&gt;</span>
<a id="line-3" name="line-3"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">&lt;DFileDialog&gt;</span>
<a id="line-4" name="line-4"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">&lt;DMessageManager&gt;</span>
<a id="line-5" name="line-5"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">&lt;QShortcut&gt;</span>
<a id="line-6" name="line-6"></a><span class="cp">#include</span><span class="w"> </span><span class="cpf">&lt;QWidget&gt;</span>
<a id="line-7" name="line-7"></a>
<a id="line-8" name="line-8"></a><span class="n">NewDialog</span><span class="o">::</span><span class="n">NewDialog</span><span class="p">(</span><span class="n">NewType</span><span class="w"> </span><span class="n">type</span><span class="p">,</span><span class="w"> </span><span class="n">DMainWindow</span><span class="w"> </span><span class="o">*</span><span class="n">parent</span><span class="p">)</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">DDialog</span><span class="p">(</span><span class="n">parent</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<a id="line-9" name="line-9"></a><span class="w">  </span><span class="n">setWindowTitle</span><span class="p">(</span><span class="n">tr</span><span class="p">(</span><span class="s">&quot;New&quot;</span><span class="p">));</span>
<a id="line-10" name="line-10"></a><span class="w">  </span><span class="k">auto</span><span class="w"> </span><span class="n">nopic</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">QPixmap</span><span class="p">(</span><span class="s">&quot;:/images/nopic.jpeg&quot;</span><span class="p">);</span>
<a id="line-11" name="line-11"></a><span class="w">  </span><span class="n">btnbox</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">DButtonBox</span><span class="p">(</span><span class="k">this</span><span class="p">);</span>
<a id="line-12" name="line-12"></a><span class="w">  </span><span class="n">QList</span><span class="o">&lt;</span><span class="n">DButtonBoxButton</span><span class="w"> </span><span class="o">*&gt;</span><span class="w"> </span><span class="n">blist</span><span class="p">;</span>
<a id="line-13" name="line-13"></a><span class="w">  </span><span class="k">auto</span><span class="w"> </span><span class="n">b</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">DButtonBoxButton</span><span class="p">(</span><span class="n">tr</span><span class="p">(</span><span class="s">&quot;Add&quot;</span><span class="p">),</span><span class="w"> </span><span class="k">this</span><span class="p">);</span>
<a id="line-14" name="line-14"></a><span class="w">  </span><span class="n">connect</span><span class="p">(</span><span class="n">b</span><span class="p">,</span><span class="w"> </span><span class="o">&amp;</span><span class="n">DButtonBoxButton</span><span class="o">::</span><span class="n">clicked</span><span class="p">,</span><span class="w"> </span><span class="p">[</span><span class="o">=</span><span class="p">]</span><span class="w"> </span><span class="p">{</span>
<a id="line-15" name="line-15"></a><span class="w">    </span><span class="n">QFileDialog</span><span class="w"> </span><span class="n">d</span><span class="p">;</span>
<a id="line-16" name="line-16"></a><span class="w">    </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">type</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">NewType</span><span class="o">::</span><span class="n">FromPics</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<a id="line-17" name="line-17"></a><span class="w">      </span><span class="n">d</span><span class="p">.</span><span class="n">setNameFilter</span><span class="p">(</span><span class="n">tr</span><span class="p">(</span><span class="s">&quot;Images (*.jpg *.tiff *.png)&quot;</span><span class="p">));</span>
<a id="line-18" name="line-18"></a><span class="w">    </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span>
<a id="line-19" name="line-19"></a><span class="w">      </span><span class="n">d</span><span class="p">.</span><span class="n">setNameFilter</span><span class="p">(</span><span class="s">&quot;GIF (*.gif)&quot;</span><span class="p">);</span>
<a id="line-20" name="line-20"></a><span class="w">    </span><span class="p">}</span>
<a id="line-21" name="line-21"></a><span class="w">    </span><span class="n">d</span><span class="p">.</span><span class="n">setAcceptMode</span><span class="p">(</span><span class="n">QFileDialog</span><span class="o">::</span><span class="n">AcceptOpen</span><span class="p">);</span>
<a id="line-22" name="line-22"></a><span class="w">    </span><span class="n">d</span><span class="p">.</span><span class="n">setFileMode</span><span class="p">(</span><span class="n">QFileDialog</span><span class="o">::</span><span class="n">ExistingFiles</span><span class="p">);</span>
<a id="line-23" name="line-23"></a><span class="w">    </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">d</span><span class="p">.</span><span class="n">exec</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
<a id="line-24" name="line-24"></a><span class="w">      </span><span class="k">auto</span><span class="w"> </span><span class="n">files</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">d</span><span class="p">.</span><span class="n">selectedFiles</span><span class="p">();</span>
<a id="line-25" name="line-25"></a><span class="w">      </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="k">auto</span><span class="w"> </span><span class="n">item</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">files</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<a id="line-26" name="line-26"></a><span class="w">        </span><span class="n">QImage</span><span class="w"> </span><span class="n">img</span><span class="p">;</span>
<a id="line-27" name="line-27"></a><span class="w">        </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">img</span><span class="p">.</span><span class="n">load</span><span class="p">(</span><span class="n">item</span><span class="p">))</span><span class="w"> </span><span class="p">{</span>
<a id="line-28" name="line-28"></a><span class="w">          </span><span class="n">filenames</span><span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">item</span><span class="p">;</span>
<a id="line-29" name="line-29"></a><span class="w">          </span><span class="k">auto</span><span class="w"> </span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">QListWidgetItem</span><span class="p">(</span><span class="n">QIcon</span><span class="p">(</span><span class="s">&quot;:/images/picture.png&quot;</span><span class="p">),</span><span class="w"> </span><span class="n">item</span><span class="p">,</span>
<a id="line-30" name="line-30"></a><span class="w">                                       </span><span class="n">imgslist</span><span class="p">);</span>
<a id="line-31" name="line-31"></a><span class="w">          </span><span class="n">p</span><span class="o">-&gt;</span><span class="n">setToolTip</span><span class="p">(</span><span class="n">item</span><span class="p">);</span>
<a id="line-32" name="line-32"></a><span class="w">        </span><span class="p">}</span>
<a id="line-33" name="line-33"></a><span class="w">      </span><span class="p">}</span>
<a id="line-34" name="line-34"></a><span class="w">    </span><span class="p">}</span>
<a id="line-35" name="line-35"></a><span class="w">  </span><span class="p">});</span>
<a id="line-36" name="line-36"></a><span class="w">  </span><span class="n">blist</span><span class="p">.</span><span class="n">append</span><span class="p">(</span><span class="n">b</span><span class="p">);</span>
<a id="line-37" name="line-37"></a><span class="w">  </span><span class="n">b</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">DButtonBoxButton</span><span class="p">(</span><span class="n">tr</span><span class="p">(</span><span class="s">&quot;Remove&quot;</span><span class="p">),</span><span class="w"> </span><span class="k">this</span><span class="p">);</span>
<a id="line-38" name="line-38"></a><span class="w">  </span><span class="n">connect</span><span class="p">(</span><span class="n">b</span><span class="p">,</span><span class="w"> </span><span class="o">&amp;</span><span class="n">DButtonBoxButton</span><span class="o">::</span><span class="n">clicked</span><span class="p">,</span><span class="w"> </span><span class="p">[</span><span class="o">=</span><span class="p">]</span><span class="w"> </span><span class="p">{</span>
<a id="line-39" name="line-39"></a><span class="w">    </span><span class="k">auto</span><span class="w"> </span><span class="n">indices</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">imgslist</span><span class="o">-&gt;</span><span class="n">selectionModel</span><span class="p">()</span><span class="o">-&gt;</span><span class="n">selectedRows</span><span class="p">();</span>
<a id="line-40" name="line-40"></a><span class="w">    </span><span class="n">QList</span><span class="o">&lt;</span><span class="kt">int</span><span class="o">&gt;</span><span class="w"> </span><span class="n">ins</span><span class="p">;</span>
<a id="line-41" name="line-41"></a><span class="w">    </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="k">auto</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">indices</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<a id="line-42" name="line-42"></a><span class="w">      </span><span class="n">ins</span><span class="p">.</span><span class="n">append</span><span class="p">(</span><span class="n">i</span><span class="p">.</span><span class="n">row</span><span class="p">());</span>
<a id="line-43" name="line-43"></a><span class="w">    </span><span class="p">}</span>
<a id="line-44" name="line-44"></a><span class="w">    </span><span class="n">std</span><span class="o">::</span><span class="n">sort</span><span class="p">(</span><span class="n">ins</span><span class="p">.</span><span class="n">begin</span><span class="p">(),</span><span class="w"> </span><span class="n">ins</span><span class="p">.</span><span class="n">end</span><span class="p">(),</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">greater</span><span class="o">&lt;</span><span class="kt">int</span><span class="o">&gt;</span><span class="p">());</span>
<a id="line-45" name="line-45"></a><span class="w">    </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="k">auto</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">ins</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<a id="line-46" name="line-46"></a><span class="w">      </span><span class="k">auto</span><span class="w"> </span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">imgslist</span><span class="o">-&gt;</span><span class="n">item</span><span class="p">(</span><span class="n">i</span><span class="p">);</span>
<a id="line-47" name="line-47"></a><span class="w">      </span><span class="n">imgslist</span><span class="o">-&gt;</span><span class="n">removeItemWidget</span><span class="p">(</span><span class="n">p</span><span class="p">);</span>
<a id="line-48" name="line-48"></a><span class="w">      </span><span class="k">delete</span><span class="w"> </span><span class="n">p</span><span class="p">;</span>
<a id="line-49" name="line-49"></a><span class="w">      </span><span class="n">filenames</span><span class="p">.</span><span class="n">removeAt</span><span class="p">(</span><span class="n">i</span><span class="p">);</span>
<a id="line-50" name="line-50"></a><span class="w">    </span><span class="p">}</span>
<a id="line-51" name="line-51"></a><span class="w">  </span><span class="p">});</span>
<a id="line-52" name="line-52"></a><span class="w">  </span><span class="n">blist</span><span class="p">.</span><span class="n">append</span><span class="p">(</span><span class="n">b</span><span class="p">);</span>
<a id="line-53" name="line-53"></a><span class="w">  </span><span class="n">b</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">DButtonBoxButton</span><span class="p">(</span><span class="n">tr</span><span class="p">(</span><span class="s">&quot;Clear&quot;</span><span class="p">),</span><span class="w"> </span><span class="k">this</span><span class="p">);</span>
<a id="line-54" name="line-54"></a><span class="w">  </span><span class="n">connect</span><span class="p">(</span><span class="n">b</span><span class="p">,</span><span class="w"> </span><span class="o">&amp;</span><span class="n">DButtonBoxButton</span><span class="o">::</span><span class="n">clicked</span><span class="p">,</span><span class="w"> </span><span class="p">[</span><span class="o">=</span><span class="p">]</span><span class="w"> </span><span class="p">{</span>
<a id="line-55" name="line-55"></a><span class="w">    </span><span class="n">imgslist</span><span class="o">-&gt;</span><span class="n">clear</span><span class="p">();</span>
<a id="line-56" name="line-56"></a><span class="w">    </span><span class="n">filenames</span><span class="p">.</span><span class="n">clear</span><span class="p">();</span>
<a id="line-57" name="line-57"></a><span class="w">  </span><span class="p">});</span>
<a id="line-58" name="line-58"></a><span class="w">  </span><span class="n">blist</span><span class="p">.</span><span class="n">append</span><span class="p">(</span><span class="n">b</span><span class="p">);</span>
<a id="line-59" name="line-59"></a><span class="w">  </span><span class="n">b</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">DButtonBoxButton</span><span class="p">(</span><span class="n">tr</span><span class="p">(</span><span class="s">&quot;MoveUp&quot;</span><span class="p">),</span><span class="w"> </span><span class="k">this</span><span class="p">);</span>
<a id="line-60" name="line-60"></a><span class="w">  </span><span class="n">connect</span><span class="p">(</span><span class="n">b</span><span class="p">,</span><span class="w"> </span><span class="o">&amp;</span><span class="n">DButtonBoxButton</span><span class="o">::</span><span class="n">clicked</span><span class="p">,</span><span class="w"> </span><span class="p">[</span><span class="o">=</span><span class="p">]</span><span class="w"> </span><span class="p">{</span>
<a id="line-61" name="line-61"></a><span class="w">    </span><span class="k">auto</span><span class="w"> </span><span class="n">si</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">imgslist</span><span class="o">-&gt;</span><span class="n">selectionModel</span><span class="p">()</span><span class="o">-&gt;</span><span class="n">selectedRows</span><span class="p">();</span>
<a id="line-62" name="line-62"></a><span class="w">    </span><span class="k">auto</span><span class="w"> </span><span class="n">len</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">si</span><span class="p">.</span><span class="n">count</span><span class="p">();</span>
<a id="line-63" name="line-63"></a><span class="w">    </span><span class="n">QVector</span><span class="o">&lt;</span><span class="kt">int</span><span class="o">&gt;</span><span class="w"> </span><span class="n">indices</span><span class="p">(</span><span class="n">len</span><span class="p">);</span>
<a id="line-64" name="line-64"></a><span class="w">    </span><span class="k">auto</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span>
<a id="line-65" name="line-65"></a><span class="w">    </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="k">auto</span><span class="w"> </span><span class="o">&amp;</span><span class="n">item</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">si</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<a id="line-66" name="line-66"></a><span class="w">      </span><span class="n">indices</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">item</span><span class="p">.</span><span class="n">row</span><span class="p">();</span>
<a id="line-67" name="line-67"></a><span class="w">    </span><span class="p">}</span>
<a id="line-68" name="line-68"></a><span class="w">    </span><span class="n">std</span><span class="o">::</span><span class="n">sort</span><span class="p">(</span><span class="n">indices</span><span class="p">.</span><span class="n">begin</span><span class="p">(),</span><span class="w"> </span><span class="n">indices</span><span class="p">.</span><span class="n">end</span><span class="p">());</span>
<a id="line-69" name="line-69"></a><span class="w">    </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">indices</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<a id="line-70" name="line-70"></a><span class="w">      </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="n">len</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<a id="line-71" name="line-71"></a><span class="w">        </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">indices</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">i</span><span class="p">)</span>
<a id="line-72" name="line-72"></a><span class="w">          </span><span class="k">break</span><span class="p">;</span>
<a id="line-73" name="line-73"></a><span class="w">      </span><span class="p">}</span>
<a id="line-74" name="line-74"></a><span class="w">    </span><span class="p">}</span>
<a id="line-75" name="line-75"></a>
<a id="line-76" name="line-76"></a><span class="w">    </span><span class="k">for</span><span class="w"> </span><span class="p">(;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="n">len</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<a id="line-77" name="line-77"></a><span class="w">      </span><span class="k">auto</span><span class="w"> </span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">imgslist</span><span class="o">-&gt;</span><span class="n">takeItem</span><span class="p">(</span><span class="n">i</span><span class="p">);</span>
<a id="line-78" name="line-78"></a><span class="w">      </span><span class="n">imgslist</span><span class="o">-&gt;</span><span class="n">insertItem</span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="n">p</span><span class="p">);</span>
<a id="line-79" name="line-79"></a><span class="w">      </span><span class="n">filenames</span><span class="p">.</span><span class="n">move</span><span class="p">(</span><span class="n">i</span><span class="p">,</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span>
<a id="line-80" name="line-80"></a><span class="w">    </span><span class="p">}</span>
<a id="line-81" name="line-81"></a><span class="w">  </span><span class="p">});</span>
<a id="line-82" name="line-82"></a><span class="w">  </span><span class="n">blist</span><span class="p">.</span><span class="n">append</span><span class="p">(</span><span class="n">b</span><span class="p">);</span>
<a id="line-83" name="line-83"></a><span class="w">  </span><span class="n">b</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">DButtonBoxButton</span><span class="p">(</span><span class="n">tr</span><span class="p">(</span><span class="s">&quot;MoveDown&quot;</span><span class="p">),</span><span class="w"> </span><span class="k">this</span><span class="p">);</span>
<a id="line-84" name="line-84"></a><span class="w">  </span><span class="n">connect</span><span class="p">(</span><span class="n">b</span><span class="p">,</span><span class="w"> </span><span class="o">&amp;</span><span class="n">DButtonBoxButton</span><span class="o">::</span><span class="n">clicked</span><span class="p">,</span><span class="w"> </span><span class="p">[</span><span class="o">=</span><span class="p">]</span><span class="w"> </span><span class="p">{</span>
<a id="line-85" name="line-85"></a><span class="w">    </span><span class="k">auto</span><span class="w"> </span><span class="n">si</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">imgslist</span><span class="o">-&gt;</span><span class="n">selectionModel</span><span class="p">()</span><span class="o">-&gt;</span><span class="n">selectedRows</span><span class="p">();</span>
<a id="line-86" name="line-86"></a><span class="w">    </span><span class="k">auto</span><span class="w"> </span><span class="n">len</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">si</span><span class="p">.</span><span class="n">count</span><span class="p">();</span>
<a id="line-87" name="line-87"></a><span class="w">    </span><span class="n">QVector</span><span class="o">&lt;</span><span class="kt">int</span><span class="o">&gt;</span><span class="w"> </span><span class="n">indices</span><span class="p">(</span><span class="n">len</span><span class="p">);</span>
<a id="line-88" name="line-88"></a><span class="w">    </span><span class="k">auto</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span>
<a id="line-89" name="line-89"></a><span class="w">    </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="k">auto</span><span class="w"> </span><span class="o">&amp;</span><span class="n">item</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="n">si</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<a id="line-90" name="line-90"></a><span class="w">      </span><span class="n">indices</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">item</span><span class="p">.</span><span class="n">row</span><span class="p">();</span>
<a id="line-91" name="line-91"></a><span class="w">    </span><span class="p">}</span>
<a id="line-92" name="line-92"></a><span class="w">    </span><span class="n">std</span><span class="o">::</span><span class="n">sort</span><span class="p">(</span><span class="n">indices</span><span class="p">.</span><span class="n">begin</span><span class="p">(),</span><span class="w"> </span><span class="n">indices</span><span class="p">.</span><span class="n">end</span><span class="p">(),</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">greater</span><span class="o">&lt;</span><span class="kt">int</span><span class="o">&gt;</span><span class="p">());</span>
<a id="line-93" name="line-93"></a><span class="w">    </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">indices</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">len</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">1</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<a id="line-94" name="line-94"></a><span class="w">      </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="n">len</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<a id="line-95" name="line-95"></a><span class="w">        </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">indices</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="n">len</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">1</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">i</span><span class="p">)</span>
<a id="line-96" name="line-96"></a><span class="w">          </span><span class="k">break</span><span class="p">;</span>
<a id="line-97" name="line-97"></a><span class="w">      </span><span class="p">}</span>
<a id="line-98" name="line-98"></a><span class="w">    </span><span class="p">}</span>
<a id="line-99" name="line-99"></a><span class="w">    </span><span class="k">for</span><span class="w"> </span><span class="p">(;</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="n">len</span><span class="p">;</span><span class="w"> </span><span class="n">i</span><span class="o">++</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<a id="line-100" name="line-100"></a><span class="w">      </span><span class="k">auto</span><span class="w"> </span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">imgslist</span><span class="o">-&gt;</span><span class="n">takeItem</span><span class="p">(</span><span class="n">i</span><span class="p">);</span>
<a id="line-101" name="line-101"></a><span class="w">      </span><span class="n">imgslist</span><span class="o">-&gt;</span><span class="n">insertItem</span><span class="p">(</span><span class="n">i</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="n">p</span><span class="p">);</span>
<a id="line-102" name="line-102"></a><span class="w">      </span><span class="n">filenames</span><span class="p">.</span><span class="n">move</span><span class="p">(</span><span class="n">i</span><span class="p">,</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span>
<a id="line-103" name="line-103"></a><span class="w">    </span><span class="p">}</span>
<a id="line-104" name="line-104"></a><span class="w">  </span><span class="p">});</span>
<a id="line-105" name="line-105"></a><span class="w">  </span><span class="n">blist</span><span class="p">.</span><span class="n">append</span><span class="p">(</span><span class="n">b</span><span class="p">);</span>
<a id="line-106" name="line-106"></a><span class="w">  </span><span class="n">btnbox</span><span class="o">-&gt;</span><span class="n">setButtonList</span><span class="p">(</span><span class="n">blist</span><span class="p">,</span><span class="w"> </span><span class="nb">false</span><span class="p">);</span>
<a id="line-107" name="line-107"></a><span class="w">  </span><span class="n">addContent</span><span class="p">(</span><span class="n">btnbox</span><span class="p">);</span>
<a id="line-108" name="line-108"></a><span class="w">  </span><span class="n">addSpacing</span><span class="p">(</span><span class="mi">10</span><span class="p">);</span>
<a id="line-109" name="line-109"></a><span class="w">  </span><span class="k">auto</span><span class="w"> </span><span class="n">w</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">QWidget</span><span class="p">(</span><span class="k">this</span><span class="p">);</span>
<a id="line-110" name="line-110"></a><span class="w">  </span><span class="k">auto</span><span class="w"> </span><span class="n">hbox</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">QHBoxLayout</span><span class="p">(</span><span class="n">w</span><span class="p">);</span>
<a id="line-111" name="line-111"></a><span class="w">  </span><span class="n">imgslist</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">DListWidget</span><span class="p">(</span><span class="k">this</span><span class="p">);</span>
<a id="line-112" name="line-112"></a><span class="w">  </span><span class="n">hbox</span><span class="o">-&gt;</span><span class="n">addWidget</span><span class="p">(</span><span class="n">imgslist</span><span class="p">);</span>
<a id="line-113" name="line-113"></a><span class="w">  </span><span class="k">auto</span><span class="w"> </span><span class="n">vbox</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">QVBoxLayout</span><span class="p">(</span><span class="n">w</span><span class="p">);</span>
<a id="line-114" name="line-114"></a><span class="w">  </span><span class="n">hbox</span><span class="o">-&gt;</span><span class="n">addLayout</span><span class="p">(</span><span class="n">vbox</span><span class="p">);</span>
<a id="line-115" name="line-115"></a><span class="w">  </span><span class="n">imgview</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">DLabel</span><span class="p">(</span><span class="k">this</span><span class="p">);</span>
<a id="line-116" name="line-116"></a><span class="w">  </span><span class="n">imgview</span><span class="o">-&gt;</span><span class="n">setFixedSize</span><span class="p">(</span><span class="mi">200</span><span class="p">,</span><span class="w"> </span><span class="mi">200</span><span class="p">);</span>
<a id="line-117" name="line-117"></a><span class="w">  </span><span class="n">imgview</span><span class="o">-&gt;</span><span class="n">setScaledContents</span><span class="p">(</span><span class="nb">true</span><span class="p">);</span>
<a id="line-118" name="line-118"></a><span class="w">  </span><span class="n">imgview</span><span class="o">-&gt;</span><span class="n">setPixmap</span><span class="p">(</span><span class="n">nopic</span><span class="p">.</span><span class="n">scaled</span><span class="p">(</span><span class="n">imgview</span><span class="o">-&gt;</span><span class="n">size</span><span class="p">(),</span><span class="w"> </span><span class="n">Qt</span><span class="o">::</span><span class="n">KeepAspectRatio</span><span class="p">,</span>
<a id="line-119" name="line-119"></a><span class="w">                                  </span><span class="n">Qt</span><span class="o">::</span><span class="n">SmoothTransformation</span><span class="p">));</span>
<a id="line-120" name="line-120"></a><span class="w">  </span><span class="n">vbox</span><span class="o">-&gt;</span><span class="n">addWidget</span><span class="p">(</span><span class="n">imgview</span><span class="p">);</span>
<a id="line-121" name="line-121"></a><span class="w">  </span><span class="n">vbox</span><span class="o">-&gt;</span><span class="n">addSpacing</span><span class="p">(</span><span class="mi">5</span><span class="p">);</span>
<a id="line-122" name="line-122"></a><span class="w">  </span><span class="n">vbox</span><span class="o">-&gt;</span><span class="n">addWidget</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">DLabel</span><span class="p">(</span><span class="n">tr</span><span class="p">(</span><span class="s">&quot;Size&quot;</span><span class="p">),</span><span class="w"> </span><span class="k">this</span><span class="p">));</span>
<a id="line-123" name="line-123"></a><span class="w">  </span><span class="n">imgsize</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">DLabel</span><span class="p">(</span><span class="n">tr</span><span class="p">(</span><span class="s">&quot;Unknown&quot;</span><span class="p">),</span><span class="w"> </span><span class="k">this</span><span class="p">);</span>
<a id="line-124" name="line-124"></a><span class="w">  </span><span class="n">vbox</span><span class="o">-&gt;</span><span class="n">addWidget</span><span class="p">(</span><span class="n">imgsize</span><span class="p">);</span>
<a id="line-125" name="line-125"></a><span class="w">  </span><span class="n">addContent</span><span class="p">(</span><span class="n">w</span><span class="p">);</span>
<a id="line-126" name="line-126"></a><span class="w">  </span><span class="n">addSpacing</span><span class="p">(</span><span class="mi">5</span><span class="p">);</span>
<a id="line-127" name="line-127"></a><span class="w">  </span><span class="n">addContent</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">DLabel</span><span class="p">(</span><span class="n">tr</span><span class="p">(</span><span class="s">&quot;FirstSizeJudge&quot;</span><span class="p">),</span><span class="w"> </span><span class="k">this</span><span class="p">));</span>
<a id="line-128" name="line-128"></a><span class="w">  </span><span class="n">addSpacing</span><span class="p">(</span><span class="mi">20</span><span class="p">);</span>
<a id="line-129" name="line-129"></a><span class="w">  </span><span class="k">auto</span><span class="w"> </span><span class="n">dbbox</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">DDialogButtonBox</span><span class="p">(</span>
<a id="line-130" name="line-130"></a><span class="w">      </span><span class="n">DDialogButtonBox</span><span class="o">::</span><span class="n">Ok</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">DDialogButtonBox</span><span class="o">::</span><span class="n">Cancel</span><span class="p">,</span><span class="w"> </span><span class="k">this</span><span class="p">);</span>
<a id="line-131" name="line-131"></a><span class="w">  </span><span class="n">connect</span><span class="p">(</span><span class="n">dbbox</span><span class="p">,</span><span class="w"> </span><span class="o">&amp;</span><span class="n">DDialogButtonBox</span><span class="o">::</span><span class="n">accepted</span><span class="p">,</span><span class="w"> </span><span class="k">this</span><span class="p">,</span><span class="w"> </span><span class="o">&amp;</span><span class="n">NewDialog</span><span class="o">::</span><span class="n">on_accept</span><span class="p">);</span>
<a id="line-132" name="line-132"></a><span class="w">  </span><span class="n">connect</span><span class="p">(</span><span class="n">dbbox</span><span class="p">,</span><span class="w"> </span><span class="o">&amp;</span><span class="n">DDialogButtonBox</span><span class="o">::</span><span class="n">rejected</span><span class="p">,</span><span class="w"> </span><span class="k">this</span><span class="p">,</span><span class="w"> </span><span class="o">&amp;</span><span class="n">NewDialog</span><span class="o">::</span><span class="n">on_reject</span><span class="p">);</span>
<a id="line-133" name="line-133"></a><span class="w">  </span><span class="k">auto</span><span class="w"> </span><span class="n">key</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">QKeySequence</span><span class="p">(</span><span class="n">Qt</span><span class="o">::</span><span class="n">Key_Return</span><span class="p">);</span>
<a id="line-134" name="line-134"></a><span class="w">  </span><span class="k">auto</span><span class="w"> </span><span class="n">s</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">QShortcut</span><span class="p">(</span><span class="n">key</span><span class="p">,</span><span class="w"> </span><span class="k">this</span><span class="p">);</span>
<a id="line-135" name="line-135"></a><span class="w">  </span><span class="n">connect</span><span class="p">(</span><span class="n">s</span><span class="p">,</span><span class="w"> </span><span class="o">&amp;</span><span class="n">QShortcut</span><span class="o">::</span><span class="n">activated</span><span class="p">,</span><span class="w"> </span><span class="k">this</span><span class="p">,</span><span class="w"> </span><span class="o">&amp;</span><span class="n">NewDialog</span><span class="o">::</span><span class="n">on_accept</span><span class="p">);</span>
<a id="line-136" name="line-136"></a><span class="w">  </span><span class="n">addContent</span><span class="p">(</span><span class="n">dbbox</span><span class="p">);</span>
<a id="line-137" name="line-137"></a>
<a id="line-138" name="line-138"></a><span class="w">  </span><span class="n">connect</span><span class="p">(</span><span class="n">imgslist</span><span class="p">,</span><span class="w"> </span><span class="o">&amp;</span><span class="n">DListWidget</span><span class="o">::</span><span class="n">itemSelectionChanged</span><span class="p">,</span><span class="w"> </span><span class="k">this</span><span class="p">,</span><span class="w"> </span><span class="p">[</span><span class="o">=</span><span class="p">]</span><span class="w"> </span><span class="p">{</span>
<a id="line-139" name="line-139"></a><span class="w">    </span><span class="k">auto</span><span class="w"> </span><span class="n">cur</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">imgslist</span><span class="o">-&gt;</span><span class="n">currentItem</span><span class="p">();</span>
<a id="line-140" name="line-140"></a><span class="w">    </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">cur</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<a id="line-141" name="line-141"></a><span class="w">      </span><span class="k">auto</span><span class="w"> </span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">QPixmap</span><span class="p">(</span><span class="n">cur</span><span class="o">-&gt;</span><span class="n">text</span><span class="p">());</span>
<a id="line-142" name="line-142"></a><span class="w">      </span><span class="n">imgview</span><span class="o">-&gt;</span><span class="n">setPixmap</span><span class="p">(</span><span class="n">p</span><span class="p">.</span><span class="n">scaled</span><span class="p">(</span><span class="n">imgview</span><span class="o">-&gt;</span><span class="n">size</span><span class="p">(),</span><span class="w"> </span><span class="n">Qt</span><span class="o">::</span><span class="n">KeepAspectRatio</span><span class="p">,</span>
<a id="line-143" name="line-143"></a><span class="w">                                  </span><span class="n">Qt</span><span class="o">::</span><span class="n">SmoothTransformation</span><span class="p">));</span>
<a id="line-144" name="line-144"></a><span class="w">      </span><span class="n">imgsize</span><span class="o">-&gt;</span><span class="n">setText</span><span class="p">(</span>
<a id="line-145" name="line-145"></a><span class="w">          </span><span class="n">QString</span><span class="p">(</span><span class="s">&quot;%1 × %2&quot;</span><span class="p">).</span><span class="n">arg</span><span class="p">(</span><span class="n">p</span><span class="p">.</span><span class="n">size</span><span class="p">().</span><span class="n">width</span><span class="p">()).</span><span class="n">arg</span><span class="p">(</span><span class="n">p</span><span class="p">.</span><span class="n">size</span><span class="p">().</span><span class="n">height</span><span class="p">()));</span>
<a id="line-146" name="line-146"></a><span class="w">    </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span>
<a id="line-147" name="line-147"></a><span class="w">      </span><span class="n">imgview</span><span class="o">-&gt;</span><span class="n">setPixmap</span><span class="p">(</span><span class="n">nopic</span><span class="p">);</span>
<a id="line-148" name="line-148"></a><span class="w">      </span><span class="n">imgsize</span><span class="o">-&gt;</span><span class="n">setText</span><span class="p">(</span><span class="n">tr</span><span class="p">(</span><span class="s">&quot;Unknown&quot;</span><span class="p">));</span>
<a id="line-149" name="line-149"></a><span class="w">    </span><span class="p">}</span>
<a id="line-150" name="line-150"></a><span class="w">  </span><span class="p">});</span>
<a id="line-151" name="line-151"></a><span class="p">}</span>
<a id="line-152" name="line-152"></a>
<a id="line-153" name="line-153"></a><span class="n">QStringList</span><span class="w"> </span><span class="n">NewDialog</span><span class="o">::</span><span class="n">getResult</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">filenames</span><span class="p">;</span><span class="w"> </span><span class="p">}</span>
<a id="line-154" name="line-154"></a>
<a id="line-155" name="line-155"></a><span class="kt">void</span><span class="w"> </span><span class="n">NewDialog</span><span class="o">::</span><span class="n">on_accept</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
<a id="line-156" name="line-156"></a><span class="w">  </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">filenames</span><span class="p">.</span><span class="n">count</span><span class="p">())</span><span class="w"> </span><span class="p">{</span>
<a id="line-157" name="line-157"></a><span class="w">    </span><span class="n">done</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span>
<a id="line-158" name="line-158"></a><span class="w">    </span><span class="k">return</span><span class="p">;</span>
<a id="line-159" name="line-159"></a><span class="w">  </span><span class="p">}</span>
<a id="line-160" name="line-160"></a><span class="w">  </span><span class="n">DMessageManager</span><span class="o">::</span><span class="n">instance</span><span class="p">()</span><span class="o">-&gt;</span><span class="n">sendMessage</span><span class="p">(</span><span class="k">this</span><span class="p">,</span><span class="w"> </span><span class="n">QIcon</span><span class="p">(</span><span class="s">&quot;:/images/new.png&quot;</span><span class="p">),</span>
<a id="line-161" name="line-161"></a><span class="w">                                           </span><span class="n">tr</span><span class="p">(</span><span class="s">&quot;NoImageFile&quot;</span><span class="p">));</span>
<a id="line-162" name="line-162"></a><span class="p">}</span>
<a id="line-163" name="line-163"></a>
<a id="line-164" name="line-164"></a><span class="kt">void</span><span class="w"> </span><span class="n">NewDialog</span><span class="o">::</span><span class="n">on_reject</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">done</span><span class="p">(</span><span class="mi">0</span><span class="p">);</span><span class="w"> </span><span class="p">}</span>
<a id="line-165" name="line-165"></a>
<a id="line-166" name="line-166"></a><span class="kt">void</span><span class="w"> </span><span class="n">NewDialog</span><span class="o">::</span><span class="n">closeEvent</span><span class="p">(</span><span class="n">QCloseEvent</span><span class="w"> </span><span class="o">*</span><span class="n">event</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<a id="line-167" name="line-167"></a><span class="hll"><span class="w">  </span><span class="n">Q_UNUSED</span><span class="p">(</span><span class="n">event</span><span class="p">)</span><span class="error2">&lt;--- There is an unknown macro here somewhere. Configuration is required. If Q_UNUSED is a macro then please configure it.</span>
</span><a id="line-168" name="line-168"></a><span class="w">  </span><span class="n">done</span><span class="p">(</span><span class="mi">0</span><span class="p">);</span>
<a id="line-169" name="line-169"></a><span class="p">}</span>
</pre></div></td></tr></table></div>

    </div>
    <div id="footer" class="footer">
      <p>
        Created by Cppcheck 2.10 (<a href="https://cppcheck.sourceforge.io">Sourceforge</a>, <a href="irc://irc.freenode.net/cppcheck">IRC</a>)
      </p>
    </div>
    </div>
  </body>
</html>
